package com.xiaoluo.lottery.service;

import com.xiaoluo.lottery.dao.HbInfoJdbcDao;
import com.xiaoluo.lottery.entity.HbInfo;
import com.xiaoluo.lottery.filter.HbFilter;
import com.xiaoluo.lottery.vo.DataPage;
import com.xiaoluo.lottery.vo.HbInfoSumVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Project : lottery
 * Package : com.xiaoluo.lottery.service
 * Created by Willian.
 * Date  : 2016/4/13 11:05.
 */

@Service
@Transactional
public class HbInfoServiceImpl {

    @Autowired
    private HbInfoJdbcDao hbInfoJdbcDao;

    /**
     *
     * @param filter
     * @return
     */
    public DataPage<HbInfo> findAll(HbFilter filter){
        return hbInfoJdbcDao.select(filter);
    }

    /**
     * 红包金额统计
     * @param filter
     * @return
     */
    public HbInfoSumVo sum(HbFilter filter){
        return hbInfoJdbcDao.sum(filter);
    }
}
